/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package proteoman.data;

import java.util.Set;
import java.util.HashSet;

/**
 *
 * @author gjj
 */
public class MassProteinDataImpl extends ProteinDataImpl implements MassProteinData  {

    protected Set<MassPeptideData> massPeptides;
    protected double mw; //molecular weight
    protected double coverage;

    public MassProteinDataImpl() {
        massPeptides = new HashSet<MassPeptideData>();
    }

    public double getMW() {
        return mw;
    }

    public double getCoverage() {
        return coverage;
    }

    public int countSpectra() {
        int n = 0;
        for (MassPeptideData peptide : massPeptides) {
            n += peptide.getMassSpectra().size();
        }
        return n;
    }

    public Set<MassPeptideData> getMassPeptides() {
        return massPeptides;
    }

    public void setMW(final double mw) {
        this.mw = mw;
    }

    public void setCoverage(final double coverage) {
        this.coverage = coverage;
    }

    public void addMassPeptide(final MassPeptideData peptide) {
        massPeptides.add(peptide);
    }

}
